package com.example.oasystem.service.impl;

import com.example.oasystem.dao.position.AoaPositionDao;
import com.example.oasystem.entity.dept.AoaDept;
import com.example.oasystem.entity.position.AoaPosition;
import com.example.oasystem.entity.user.AoaUser;
import com.example.oasystem.service.AoaPositionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class AoaPositionServiceImpl implements AoaPositionService {

    @Autowired
    AoaPositionDao aoaPositionDao;
    @Override
    public int deleteByPrimaryKey(Long positionId) {
        return aoaPositionDao.deleteByPrimaryKey(positionId);
    }

    @Override
    public int insert(AoaPosition record) {
        return aoaPositionDao.insert(record);
    }

    @Override
    public int insertSelective(AoaPosition record) {
        return aoaPositionDao.insertSelective(record);
    }

    @Override
    public AoaPosition selectByPrimaryKey(Long positionId) {
        return aoaPositionDao.selectByPrimaryKey(positionId);
    }

    @Override
    public int updateByPrimaryKeySelective(AoaPosition record) {
        return aoaPositionDao.updateByPrimaryKeySelective(record);
    }

    @Override
    public List<AoaPosition> paginationPosition(String name, int number, int size) {
        return aoaPositionDao.paginationPosition(name, number, size);
    }

    @Override
    public List<AoaUser> users(Long positionId) {
        return aoaPositionDao.users(positionId);
    }

    @Override
    public List<AoaDept> aoaDepts() {
        return aoaPositionDao.aoaDepts();
    }

    @Override
    public AoaDept aoaDept(Long deptId) {
        return aoaPositionDao.aoaDept(deptId);
    }

    @Override
    public List<AoaPosition> aoaPosition(String name) {
        return aoaPositionDao.aoaPosition(name);
    }

    @Override
    public int updateByPrimaryKey(AoaPosition record) {
        return aoaPositionDao.updateByPrimaryKey(record);
    }

    @Override
    public List<AoaPosition> selectAllPositions() {
        return aoaPositionDao.selectAllPositions();
    }

    @Override
    public List<AoaPosition> selectByDeptId(Long deptid) {
        return aoaPositionDao.selectByDeptIdOnDept(deptid);
    }
}
